package com.qianfeng.entity;


import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

public class Employee {

  private Integer empId;
  private String empName;
  private Integer deptId;
  private Department department;
  private String gender;
  private String phone;
  private String qq;
  private String email;
  @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
  @DateTimeFormat(pattern = "yyyy-MM-dd")
  private Date hireTime;
  private String empPassword;
  private Integer roleId;
  private Role role;
  private String salt;

  public String getSalt() {
    return salt;
  }

  public void setSalt(String salt) {
    this.salt = salt;
  }

  public Employee(Integer empId) {
    this.empId = empId;
  }



  public Integer getEmpId() {
    return empId;
  }

  public void setEmpId(Integer empId) {
    this.empId = empId;
  }

  public String getEmpName() {
    return empName;
  }

  public void setEmpName(String empName) {
    this.empName = empName;
  }

  public Integer getDeptId() {
    return deptId;
  }

  public void setDeptId(Integer deptId) {
    this.deptId = deptId;
  }

  public Department getDepartment() {
    return department;
  }

  public void setDepartment(Department department) {
    this.department = department;
  }

  public String getGender() {
    return gender;
  }

  public void setGender(String gender) {
    this.gender = gender;
  }

  public String getPhone() {
    return phone;
  }

  public void setPhone(String phone) {
    this.phone = phone;
  }

  public String getQq() {
    return qq;
  }

  public void setQq(String qq) {
    this.qq = qq;
  }

  public String getEmail() {
    return email;
  }

  public void setEmail(String email) {
    this.email = email;
  }

  public Date getHireTime() {
    return hireTime;
  }

  public void setHireTime(Date hireTime) {
    this.hireTime = hireTime;
  }

  public String getEmpPassword() {
    return empPassword;
  }

  public void setEmpPassword(String empPassword) {
    this.empPassword = empPassword;
  }

  public Integer getRoleId() {
    return roleId;
  }

  public void setRoleId(Integer roleId) {
    this.roleId = roleId;
  }

  public Role getRole() {
    return role;
  }

  public void setRole(Role role) {
    this.role = role;
  }

  public Employee() {
  }

  @Override
  public String toString() {
    return "Employee{" +
            "empId=" + empId +
            ", empName='" + empName + '\'' +
            ", deptId=" + deptId +
            ", department=" + department +
            ", gender='" + gender + '\'' +
            ", phone='" + phone + '\'' +
            ", qq='" + qq + '\'' +
            ", email='" + email + '\'' +
            ", hireTime=" + hireTime +
            ", empPassword='" + empPassword + '\'' +
            ", roleId=" + roleId +
            ", role=" + role +
            ", salt='" + salt + '\'' +
            '}';
  }

  public Employee(Integer empId, String empName, Integer deptId, Department department, String gender, String phone, String qq, String email, Date hireTime, String empPassword, Integer roleId, Role role, String salt) {
    this.empId = empId;
    this.empName = empName;
    this.deptId = deptId;
    this.department = department;
    this.gender = gender;
    this.phone = phone;
    this.qq = qq;
    this.email = email;
    this.hireTime = hireTime;
    this.empPassword = empPassword;
    this.roleId = roleId;
    this.role = role;
    this.salt = salt;
  }
}
